seajs.config({
  alias: {
    'zepto': 'http://a.tbcdn.cn/mw/base/libs/zepto/1.0.0/zepto'
  },
  debug: 1
});


define(function(require,exports,module) {

		setTimeout(function(){ window.scrollTo(0, 1); }, 100);//hide the address bar
		var $ = require("zepto");


		var hotChn = {
			obj:$("#hot-channel"),
			tab:$("#hot-channel h2 .tab"),
			cont:$("#hot-channel .channel")
		}
		hotChn.tab.on("click",function() {
			var index = $(this).index();
			hotChn.cont.hide().eq(index).show();
			hotChn.tab.removeClass("on"),
			$(this).addClass("on");
			return false;
		})


		//for gift 11.11
		var gift1111 = {
			obj:$("#gift-1111"),
			closer:$("#gift-1111 .shutdown"),
			display:function() {
				if(window.localStorage && window.localStorage.getItem("gift1111") !== "false") {
					gift1111.obj.show();	
				}
			},
			remove:function() {
				gift1111.obj.hide();
				if(window.localStorage) {
					window.localStorage.setItem("gift1111","false");
				}
			}
		};
		gift1111.display();
		gift1111.closer.bind("click",function() {gift1111.remove()})
		setTimeout(function() {gift1111.remove()},5000)



		require("./search");
		require("./slider");

		require("./lazy");
		if($("header .gift").length == 1) {//if gift activity enabled
		 	seajs.use("http://a.tbcdn.cn/mw/s/hi/tmall/h5/script/gift");
		}
		require("./temai");
		require("./entry-list");

})







